<?php $arpage=$this->db->count_all('banner');?>
<div id="wrapper-content">
<table class="titrepage" width="100%">
        <tr>              
     <td width="300px">La liste des banneaux</td>
     <td align="right">Total | <?php echo $arpage?></td>
     
 </tr>
</table>
 
  <table class="list"   width="100%">
  <thead>
              <tr>
              <th width="110px">Image</th>
              <th>Nom</th>
              <th>Activation</th>
              <th width="100px">Suppression</th>    
               </tr>
          </thead> 
         <tbody>
         <?php foreach($query as $row):{ ?>
          <tr>
            <td ><img src="<?php echo base_url();?>assets/thumb/<?php echo $row['img'];?>" width="125"/></td>
            <td ><?php echo $row['name'];?></td>
            <td ><?php echo $row['display'];?></td>
            <td><a href="<?php echo site_url('SB_admin/delete_banner').'/'.$row['id'];?>" onclick="return confirm('Are you sure you want to delete?')"><img border="0"src="<?php echo base_url()?>assets/admin/images/supprimer.png"/></a></td>
            </td>
          </tr>
          <?php }?>
          <?php endforeach;?>
         <tr>
            <td colspan="6"><?php echo $pagination?></td>
        </tr>
         </tbody>
 </table>

<div class="bajouter" align="center">Ajouter une banneaux</div>
<div style="margin:10px 0px 10px 0px;display:none;">
<form   method="POST" id="formcheck" action="<?php echo site_url('SB_admin/add_banner')?>" enctype="multipart/form-data">
<table width="100%" id="formactu" cellpadding="10px" cellspacing="0">
<tr>
<td><span>Titre </span><input  type="text"   name="titre" ><br/></td></tr>
<tr><td><span>Image </span><input  type="file"  name="userfile" /></td></tr>
<tr><td><input type="submit" name="submit"  border="0" src="<?php echo base_url();?>assets/admin/images/ajouter.png"  value="Submit" alt="Submit"></td></tr>
</table>
</form>

</div>
